import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';


import { TabsPage } from '../pages/tabs/tabs';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { DepartmentNewsPage } from '../pages/department-news/department-news';
import { DepartmentFramworkPage } from '../pages/department-framwork/department-framwork';
import { DepartmentServicePage } from '../pages/department-service/department-service';
import { DepartmentPersonalPage } from '../pages/department-personal/department-personal';
import { UserSettingProvider } from '../providers/user-setting/user-setting';
import { LoginDataProvider } from '../providers/login-data/login-data';
import { LoginPage } from '../pages/login/login';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { IonicStorageModule } from '@ionic/storage';
import { NewsDataProvider } from '../providers/news-data/news-data';
import { NewsDetailPage } from '../pages/news-detail/news-detail';
import { InputTaskPage } from '../pages/input-task/input-task';
import { PersonDetailPage } from '../pages/person-detail/person-detail';
import { BuildingsDataProvider } from '../providers/buildings-data/buildings-data';
import { SqliteHelperProvider } from '../providers/sqlite-helper/sqlite-helper';
import { SQLite } from '@ionic-native/sqlite';
import { AboutPage } from '../pages/about/about';
import { ServiceSidemenuPage } from '../pages/service-sidemenu/service-sidemenu';
import { CommentDataProvider } from '../providers/comment-data/comment-data';
import { NewsCommentPage } from '../pages/news-comment/news-comment';
import { ComponentsModule } from '../components/components.module';
import { ActiveDataProvider } from '../providers/active-data/active-data';
import { SetDataProvider } from '../providers/set-data/set-data';
import { ActivePage } from '../pages/active/active';
import { SetPage } from '../pages/set/set';
import { InputActivesPage } from '../pages/input-actives/input-actives';

@NgModule({
  declarations: [
    MyApp,
    DepartmentNewsPage,
    DepartmentFramworkPage,
    DepartmentServicePage,
    DepartmentPersonalPage,
    TabsPage,
    LoginPage,
    NewsDetailPage,
    InputTaskPage,
    PersonDetailPage,
    AboutPage,
    ServiceSidemenuPage,
    NewsCommentPage,
    ActivePage,
    SetPage,
    InputActivesPage
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    ComponentsModule,
    IonicModule.forRoot(MyApp),
    IonicStorageModule.forRoot({
      name:'_mydb',
      driverOrder:['indexeddb','sqlite','websql']
    }),

  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    DepartmentNewsPage,
    DepartmentFramworkPage,
    DepartmentServicePage,
    DepartmentPersonalPage,
    TabsPage,
    LoginPage,
    NewsDetailPage,
    InputTaskPage,
    PersonDetailPage,
    AboutPage,
    ServiceSidemenuPage,
    NewsCommentPage,
    ActivePage,
    SetPage,
    InputActivesPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    UserSettingProvider,
    LoginDataProvider,
    NewsDataProvider,
    SQLite,
    BuildingsDataProvider,
    SqliteHelperProvider,
    CommentDataProvider,
    ActiveDataProvider,
    SetDataProvider,
    ActiveDataProvider,
    SetDataProvider
  ]
})
export class AppModule {}
